extends Control


var data = null

signal view(data)
signal edit(data)
signal delete(data)
#

var coin_type = ["金币","捐赠点","对战点","积分点"]

func _ready():
	pass 

func set_data(data):
	self.data = data
	var id = data["id"]
	
	$hbox/id.text = str(id)
	$hbox/type.text = coin_type[int(data.get("coinType",1))-1]
	$hbox/name.text = str(data["coinNum"])
	

func _on_view_button_up():
	emit_signal("view", data)


func _on_edit_button_up():
	emit_signal("edit", data)


func _on_delete_button_up():
	emit_signal("delete", data)
